import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class Starter {
//    public static void main(String[] args) {
//        ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1);
//        scheduledThreadPoolExecutor.scheduleAtFixedRate(new Runnable() {
//            public void run() {
//                byte[] bytes =  new CapturePictureHandle().capturePicture();
//
//                char[] ocr  = new OcrHandle().ocr(bytes);
//
//                new ActionKeyHandle().actionKey(ocr);
//            }
//        }, 0, 500, TimeUnit.MICROSECONDS);
//    }

    public static void main(String[] args) throws InterruptedException {
        while (true) {

            Thread.sleep(4000);

            byte[] bytes =  new CapturePictureHandle().capturePicture();

            char[] ocr  = new OcrHandle().ocr(bytes);

            new ActionKeyHandle().actionKey(ocr);
        }
    }
}
